import type { R, TableDataInfo } from '@/api/model/resultModel';
import type { XhljWonderfulVideoForm, XhljWonderfulVideoQuery, XhljWonderfulVideoVo } from '@/api/xhlj/model/wonderfulVideoModel';
import { request } from '@/utils/request';

// 查询精彩视频列表
export function listWonderfulVideo(query?: XhljWonderfulVideoQuery) {
  return request.get<TableDataInfo<XhljWonderfulVideoVo>>({
    url: '/xhlj/wonderfulVideo/list',
    params: query,
  });
}

// 查询精彩视频详细
export function getWonderfulVideo(wonderfulVideoId: number) {
  return request.get<R<XhljWonderfulVideoVo>>({
    url: `/xhlj/wonderfulVideo/${wonderfulVideoId}`,
  });
}

// 新增精彩视频
export function addWonderfulVideo(data: XhljWonderfulVideoForm) {
  return request.post<R<void>>({
    url: '/xhlj/wonderfulVideo',
    data,
  });
}

// 修改精彩视频
export function updateWonderfulVideo(data: XhljWonderfulVideoForm) {
  return request.put<R<void>>({
    url: '/xhlj/wonderfulVideo',
    data,
  });
}

// 删除精彩视频
export function delWonderfulVideo(wonderfulVideoIds: number | Array<number>) {
  return request.delete<R<void>>({
    url: `/xhlj/wonderfulVideo/${wonderfulVideoIds}`,
  });
}
